/**
 * 本质上就是数轴上给定一系列的点
 * 用固定长度去框，最多能框多少个点
 * 枚举每一个点，然后二分看右端点能够包含多少个点
 */
#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace std;

template <typename T>
const T & mymax(const T & a, const T & b){
    return max(a, b);
}

template<typename T, typename ... Args>
const T & mymax(const T & t, const Args & ... args){
    return max(t, mymax(args ...));
}

template<typename T>
void input(vector<T> & v, int n){
	v.assign(n + 1, {});
    for(int i=1;i<=n;++i) cin >> v[i];
	return;
}

template<typename T>
istream & operator >> (istream & is, vector<T> & v){
	for(auto & i : v) is >> i;
	return is;
}

using llt = long long;
using vi = vector<int>;
using vll = vector<llt>;

int N, K;
vi A;

double proc(){
    double ans = 0;
    sort(A.begin() + 1, A.end());
    for(int i=1;i<=N;++i){
        int r = A[i] + K;
        auto p = equal_range(A.begin() + 1, A.end(), r);
        if(p.first != p.second){
            int c = p.first - (A.begin() + i) + 1;
            double tmp = (double)(c) / N;
            if(ans < tmp) ans = tmp;
        }else{
            int c = p.first - (A.begin() + i);
            double tmp = (double)(c) / N;
            if(ans < tmp) ans = tmp;
        }
    }
    return ans;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(0);   
    cin >> N >> K;
    input(A, N);
    cout << fixed << setprecision(12) << proc() << endl;
    return 0;
}